import {API} from './config';
import CustomRequest from '@/utils/Request'

/* 
* 添加
*/
const add = async (params = {}) => {
  return CustomRequest({
    api: API.schoolAdd,
    method: 'post',
    params
  })
}

/* 
* 获取详情
*/
const detail = async (id) => {
  return CustomRequest({
    api: API.schoolDetail,
    params: {id}
  })
}

/* 
* 删除
*/
const del = async (id) => {
  return CustomRequest({
    api: API.schoolDel,
    params: {id}
  })
}

/* 
* 更新
*/
const update = async (params = {}) => {
  return CustomRequest({
    api: API.schoolUpdate,
    method: 'post',
    params
  })
}

/* 
* 获取学校信息分页列表
*/
const pageList = async (params = {}) => {
  return CustomRequest({
    api: API.schoolPage,
    method: 'post',
    params
  })
}

export {
  add,
  del,
  update,
  detail,
  pageList
  
}